package cn.wolfcode.shop.service;

import cn.wolfcode.qo.PageResult;
import cn.wolfcode.shop.domain.OrderInfo;
import cn.wolfcode.shop.qo.OrderQueryObject;
import cn.wolfcode.shop.vo.OrderStatusChangeVo;
import cn.wolfcode.shop.vo.OrderVo;

public interface IOrderInfoService {
    /**
     * 生成订单
     *
     * @return
     */
    OrderInfo generateOrder(Long userId, OrderVo orderVo);

    PageResult query(OrderQueryObject qo);

    OrderInfo getById(Long id);

    /**
     * 修改订单状态
     * @param orderId
     * @param changeType
     * @param note
     */
    void changeStatus(Long orderId, Integer changeType, String note);

    /**
     * 前台修改订单状态
     * @param orderStatusChangeVo
     */
    OrderInfo changeStatus(OrderStatusChangeVo orderStatusChangeVo);
}
